import com.beans.*;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 东莞呵呵
 * Date:2022-10-10
 * Time:17:41
 */
public class App {
    public static void main(String[] args) {
        //1、先得到上下文对象
        ApplicationContext context=new ClassPathXmlApplicationContext("spring-config.xml");
//        //2、得到bean
////        UserService user=context.getBean("userService", UserService.class);
//        //3、使用bean
////        user.sayHi()
////        UserBean user= context.getBean("sayHi",UserBean.class);
//////        //user.sayHi();
        UserController5 user=context.getBean(UserController5.class);
        user.use();


    }
}
